<template>
  <ContentWrap>
    <div>
      <img src="@/assets/imgs/hasColorLogo.png" alt="" class="logo" />
      <div class="title">江苏江顺精密机电设备有限公司</div>
      <div class="title">发货单</div>
    </div>
    <div class="tab">
      <div class="d-flex border-bottom">
        <div class="width-25 card">客户名称</div>
        <div class="width-25 card">{{ detailData.customerName }}</div>
        <div class="width-25 card">发货日期</div>
        <div class="width-25 card">{{ detailData.deliveryDate}}</div>
      </div>
      <div class="d-flex border-bottom">
        <div class="width-25 card">设备名称</div>
        <div class="width-25 card">{{ detailData.productName }}</div>
        <div class="width-25 card">设备编号</div>
        <div class="width-25 card">{{ detailData.productNumber }}</div>
      </div>
      <div class="d-flex border-bottom">
        <div class="width-10 card">序号</div>
        <div class="width-30 card">部件名称</div>
        <div class="width-20 card">数量</div>
        <div class="width-20 card">单位</div>
        <div class="width-20 card">备注</div>
      </div>
      <div class="d-flex border-bottom" v-for="item, index in detailData.details" :key="index">
        <div class="width-10 card">{{ index + 1 }}</div>
        <div class="width-30 card">{{ item['partName'] }}</div>
        <div class="width-20 card">{{ item['sendQuantity'] }}</div>
        <div class="width-20 card">{{ item['dictUnit'] }}</div>
        <div class="width-20 card"></div>
      </div>
      <div class="d-flex ">
        <div class="width-25 card-confirm">编制</div>
        <!-- {{ detailData.sendName || '' }} -->
        <div class="width-25 card-confirm"></div>
        <div class="width-25 card-confirm">接收确认</div>
        <div class="width-25 card-confirm"></div>
      </div>
    </div>
  </ContentWrap>
</template>
<script setup lang="ts">
import * as ProductionShipmentsApi from '@/api/produce/productManagement/productionShipments'
import { PropType } from 'vue'

defineProps({
  detailData: {
    type: Object as PropType<ProductionShipmentsApi.ProductionShipmentsVO>,
    default: () => {
      
    }
  }
})

</script>
<style lang="scss" scoped>
.title {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  width: 350px;
  margin: 0 auto;
}

.logo {
  float: left;
  width: 200px;
  height: 50px;
}

.tab {
  border: 1px solid #e4e7ed;
  text-align: center;
}

.d-flex {
  display: flex;
  align-items: center;
}

.card {
  height: 50px;
  line-height: 50px;
}

.card-confirm {
  height: 100px;
  line-height: 100px;
}

.card:not(:last-child),
.card-confirm:not(:last-child) {
  border-right: 1px solid #e4e7ed;
}

.height-100px {
  height: 100px;
}

.border-bottom {
  border-bottom: 1px solid #e4e7ed;
}

.width-25 {
  width: 25%;
}

.width-10 {
  width: 10%;
}

.width-20 {
  width: 20%;
}

.width-30 {
  width: 30%;
}
</style>
